﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace HGSTestLibrary.Views
{
    /// <summary>
    /// 震动测试.xaml 的交互逻辑
    /// </summary>
    public partial class 震动测试 : UserControl
    {
        public bool DialogResult { get; set; } = false;
        public 震动测试()
        {
            InitializeComponent();
        }
        /// <summary>
        /// 取消
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnCancel_Click(object sender, RoutedEventArgs e)
        {
            var win = this.Parent as Window;
            if (win != null)
            {
                win.DialogResult = false;
                win.Close();
            }
        }
        /// <summary>
        /// 确认
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnConfirm_Click(object sender, RoutedEventArgs e)
        {
            var win = this.Parent as Window;
            if (win != null)
            {
                win.DialogResult = true;
                win.Close();
            }
        }
    }
}
